package com.jr.pojo;

import com.jr.dao.IEmployeesDao;
import com.jr.dao.impl.EmployeesDaoImpl;

import java.sql.Timestamp;
import java.util.Date;

public class Users {

    private Integer id; //用户ID
    private String userName; //用户名
    private String password; //密码

    private Integer employeeId; //员工ID
    private String role; //用户角色 -- admin，hr，employee
    private Timestamp createdAt; //创建时间

    private Timestamp updatedAt; //更新时间
    private String sex; //性别
    private String address; //地址

    private String phoneNumber; //手机号码
    private String email; //电子邮箱
    private Date bornDate; //出生日期

/*    private enum Role{
        admin,hr,employee;
    }*/

    public Users() {
    }

    public Users(Integer id, String userName, String password,
                 Integer employeeId, String role, Timestamp createdAt,
                 Timestamp updatedAt, String sex, String address,
                 String phoneNumber, String email, Date bornDate) {
        this.id = id;
        this.userName = userName;
        this.password = password;
        this.employeeId = employeeId;
        this.role = role;
        this.createdAt = createdAt;
        this.updatedAt = updatedAt;
        this.sex = sex;
        this.address = address;
        this.phoneNumber = phoneNumber;
        this.email = email;
        this.bornDate = bornDate;
    }

    @Override
    public String toString() {
        return "Users{" +
                "id=" + id +
                ", userName='" + userName + '\'' +
                ", password='" + password + '\'' +
                ", employeeId=" + employeeId +
                ", role='" + role + '\'' +
                ", createdAt=" + createdAt +
                ", updatedAt=" + updatedAt +
                ", sex='" + sex + '\'' +
                ", address='" + address + '\'' +
                ", phoneNumber='" + phoneNumber + '\'' +
                ", email='" + email + '\'' +
                ", bornDate='" + bornDate + '\'' +
                '}';
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public Integer getEmployeeId() {
        return employeeId;
    }

    public void setEmployeeId(Integer employeeId) {
        this.employeeId = employeeId;
    }

    public String getRole() {
        return role;
    }

    public void setRole(String role) {
        this.role = role;
    }

    public Timestamp getCreatedAt() {
        return createdAt;
    }

    public void setCreatedAt(Timestamp createdAt) {
        this.createdAt = createdAt;
    }

    public Timestamp getUpdatedAt() {
        return updatedAt;
    }

    public void setUpdatedAt(Timestamp updatedAt) {
        this.updatedAt = updatedAt;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public String getPhoneNumber() {
        return phoneNumber;
    }

    public void setPhoneNumber(String phoneNumber) {
        this.phoneNumber = phoneNumber;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public Date getBornDate() {
        return bornDate;
    }

    public void setBornDate(Date bornDate) {
        this.bornDate = bornDate;
    }
}
